#ifndef TREE_RENDER_AGENT_H
#define TREE_RENDER_AGENT_H

#include "RenderAgentInterface.h"
#include "Tree.h"
#include "Lighting.h"
#include "TreeTextureLoader.h"
#include "Trackball.h"
#include "TreeTerrain.h"
#include "Geometry.h"

class TreeRenderAgent :
	public RenderAgentInterface
{
public:
	TreeRenderAgent(void);
	~TreeRenderAgent(void);

	char * sketchTypeName() const;

	// Adds any sketch type specific 2D rendering that must be done
	// over and above the normal display of the drawn lines
	void renderExtra2D(int numPixels, const int pixel[][2]);

	// Called once to setup the correct OpenGL environment for 3D rendering
	void initialize3D();

	// Called whenever the SketchModel changes
	void generate3DModel(vector<CSketch *> sketches, int sketch_area_width, int sketch_area_height);

	// Fully renders the 3D object that the sketch represents
	void render3D();

private:
	LifeSketchTree::CTree *treeModel;
	LifeSketchTree::CTerrain* _terrain;

	// material properties 
	GLfloat _mat_specular[4];
	GLfloat _mat_ambient_and_diffuse[4];
	GLfloat _mat_shininess[1];

	// material properties Sphere
	GLfloat _mat_specSph[4];
	GLfloat _mat_ambSph[4];
	GLfloat _mat_shinSph[1];
};

#endif
